package com.community.dao;

import com.community.pojo.Answer;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

public interface AnswerMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(Answer record);

    int insertSelective(Answer record);

    Answer selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(Answer record);

    int updateByPrimaryKey(Answer record);


    List<Map> selectGreatAnswer(Map paramMap);

    List<Map> selecyByQuestionId(@Param(value = "questionId") Integer questionId,
                                 @Param(value = "show") int show);

    /**
     * 对点赞数加1
     * @param answerId
     * @return
     */
    int plusAnswerLikeNums(int answerId);

    int plusAnswerCommentNums(int answerId);

    Map selectById(int answerId);

}